/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: xiaotutu
 * Date: 2024-03-16
 * Time: 14:53
 */
public class Test {

    public static void main(String[] args) {
        // Integer.valueOf()
        Integer a = 127;
        Integer b = 127;
        Integer c = 128;
        Integer d = 128;
        System.out.println(a == b);
        System.out.println(c == d);
    }

    public static void main2(String[] args) {
        Integer a = 10;
        int i = a.intValue(); //显示拆箱
        float f = a.floatValue(); //显示拆箱

        int ii = a; //自动拆箱
    }

    public static void main1(String[] args) {
        int a = 10;
        Integer i = a; //自动装箱
        Integer ii = Integer.valueOf(a); // 显示装箱
        Integer iii = new Integer(a);// 显示装箱
    }
}
